package com.zone.vehicle.sdk.module.superapp;

import com.zone.sdk.common.http.base.Result;
import com.zone.vehicle.sdk.module.superapp.entity.AppUpdateEntity;
import com.zone.vehicle.sdk.module.superapp.request.AppPushRequest;
import com.zone.vehicle.sdk.module.superapp.request.AppsDownloadRequest;
import com.zone.vehicle.sdk.module.superapp.request.AppsUpdateListRequest;
import com.zone.vehicle.sdk.module.superapp.request.SyncStatusRequest;
import com.zone.vehicle.sdk.module.superapp.response.AppPushResponse;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Streaming;

public interface ISuperAppCloudService {



    /**
     * 下载文件用
     * @param request
     * @return
     */
    @Streaming //添加这个注解用来下载大文件
    @POST("aps/apps/download")
    Observable<ResponseBody> appsDownload(@Body AppsDownloadRequest request);


    /**
     * 应用状态上报
     * @param request
     * @return
     */
    @POST("aps/sync/status")
    Observable<Result<Result>> syncStatus(@Body SyncStatusRequest request);


    @POST("aps/appPush")
    Observable<Result<AppPushResponse>> appPush(@Body AppPushRequest request);

    /**
     * 更新列表
     * @param request
     * @return
     */
    @POST("aps/apps/updateList")
    Observable<Result<List<AppUpdateEntity>>> updateList(@Body AppsUpdateListRequest request);


}
